import request from '@/utils/request'

/**
 * 分组搜索
 * @param data
 * @returns {PromiseLike<T | never> | Promise<T | never> | *}
 */
// 新建分组
export const creatGroup = (data: any) => {
  return request({
    url: '/scrm-api/console/tenant/group/create',
    method: 'post',
    data
  })
}
//更新 分组内容
export const updateGroup = (data: any) => {
  return request({
    url: '/scrm-api/console/tenant/group/update',
    method: 'post',
    data
  })
}
// 删除 分组
export const delGroup = (data: any) => {
  return request({
    url: '/scrm-api/console/tenant/group/destroy',
    method: 'post',
    data
  })
}
//新建敏感词
export const newSensitive = (data: any) => {
  return request({
    url: 'scrm-api/console/riskmonitoring/sensitivethesaurus/add-sensitive-words',
    method: 'post',
    data
  })
}
//删除敏感词数据
export const deleteSensitivelist = (data: any) => {
  return request({
    url: 'scrm-api/console/riskmonitoring/sensitivethesaurus/batch-delete',
    method: 'post',
    data
  })
}
//开启
export const openSensitivelist = (data: any) => {
  return request({
    url: 'scrm-api/console/riskmonitoring/sensitivethesaurus/batch-open',
    method: 'post',
    data
  })
}
//关闭
export const closeSensitivelist = (data: any) => {
  return request({
    url: 'scrm-api/console/riskmonitoring/sensitivethesaurus/batch-close',
    method: 'post',
    data
  })
}

//获取门店列表
export const getSensitivelist = (data: any) => {
  return request({
    url: 'scrm-api/console/work/contact/store/list',
    method: 'post',
    data
  })
}
// 批量操作门店
export const getStogeChange = (data: any) => {
  return request({
    url: '/scrm-api/console/work/contact/store/change',
    method: 'POST',
    data
  })
}
//获取 分组列表
export const getGroupList = (data: any) => {
  return request({
    url: '/scrm-api/console/tenant/group/getLists',
    method: 'get',
    params: data
  })
}
// 批量下载或下载
export const getStogeDownload= (data: any) => {
  return request({
    url: '/scrm-api/console/work/contact/store/download',
    method: 'POST',
    data
  })
}
// 删除
export const getStogeDel = (data: any) => {
  return request({
    url: '/scrm-api/console/work/contact/store/del',
    method: 'POST',
    data
  })
}

//红包记录列表
export const getredoacketlist= (data: any) => {
  return request({
    url: '/scrm-api/console/market/work-user-red-packet/list',
    method: 'POST',
    data
  })
}
//红包记录导出
export const getredoacketexport= (data: any) => {
  return request({
    url: '/scrm-api/console/market/work-user-red-packet/export',
    method: 'POST',
    data
  })
}
//红包记录发放
export const getredoacketgrant= (data: any) => {
  return request({
    url: '/scrm-api/console/market/work-user-red-packet/repay',
    method: 'POST',
    data
  })
}

//红包模板列表
export const gettemplatelist= (data: any) => {
  return request({
    url: '/scrm-api/console/market/work-user-red-packet/template/list',
    method: 'POST',
    data
  })
}

//红包模板启用禁用
export const gettemplatechange= (data: any) => {
  return request({
    url: '/scrm-api/console/market/work-user-red-packet/template/change',
    method: 'POST',
    data
  })
}
//红包模板删除
export const gettemplatedel= (data: any) => {
  return request({
    url: '/scrm-api/console/market/work-user-red-packet/template/del',
    method: 'POST',
    data
  })
}
//红包模板保存
export const gettemplatesave= (data: any) => {
  return request({
    url: '/scrm-api/console/market/work-user-red-packet/template/save',
    method: 'POST',
    data
  })
}
//红包限额列表
export const getlimitlist= (data: any) => {
  return request({
    url: '/scrm-api/console/market/work-user-red-packet/limit/list',
    method: 'POST',
    data
  })
}
//红包限额修改限额状态
export const getlimitchange= (data: any) => {
  return request({
    url: '/scrm-api/console/market/work-user-red-packet/limit/change',
    method: 'POST',
    data
  })
}
//红包限额删除
export const getlimitdel= (data: any) => {
  return request({
    url: '/scrm-api/console/market/work-user-red-packet/limit/del',
    method: 'POST',
    data
  })
}
//红包限额添加员工限额保存
export const getlimitsave= (data: any) => {
  return request({
    url: '/scrm-api/console/market/work-user-red-packet/limit/save',
    method: 'POST',
    data
  })
}
//红包限额添加员工限额编辑
export const getlimitedit= (data: any) => {
  return request({
    url: '/scrm-api/console/market/work-user-red-packet/limit/edit',
    method: 'POST',
    data
  })
}
//客户限额详情
export const getlimitinfo = (data: any) => {
  return request({
    url: '/scrm-api/console/market/work-user-red-packet/cust-limit/info',
    method: 'POST',
    data
  })
}
//客户限额详情编辑
export const getlimitinfosave = (data: any) => {
  return request({
    url: '/scrm-api/console/market/work-user-red-packet/cust-limit/save',
    method: 'POST',
    data
  })
}

